<?php
/**
 * 日志管理相关操作
 * 2016-9-9 10:41:39
 * @version 1.0
 */
namespace Home\Controller;
class LogmanageController extends PmpController
{
    /** 
     * 首页
     * 2016-9-9 10:41:47
     * @version 1.0
     */
    public function index()
    {
        // 获取用户提交的查询参数
        $start_time = $_REQUEST['start_time'];
        $end_time = $_REQUEST['end_time'];
        $user_name = $_REQUEST['user_name'];
        
        // 查询数据库
        $logArray = D('LogInfo')->getLog($user_name, $start_time, $end_time);
        $page = new \Think\Page(count($logArray),C('PAGE_LINE'));
        //设定显示页数
        $show = $page->show();//分页显示输出
        $logArray = D('LogInfo')->getLog($user_name, $start_time, $end_time, $page);
        
        $this->assign("logArray", $logArray);
        $this->assign("user_name",$user_name);
        $this->assign("start_time",$start_time);
        $this->assign("end_time",$end_time);
        $this->assign("page",$show);
        $this->display();
    }   
}